import request from '../../request'

// 获取角色下拉框
export function getRoleList(params) {
  return request({
    url: '/hSysUserManager/getRoleList',
    method: 'get',
    params
  })
}

// 获取用户列表
export function getSysUserManagers(params) {
  return request({
    url: '/hSysUserManager/getSysUserManagers',
    method: 'post',
    data: params
  })
}

// 获取单位下拉
export function getHospitalList(params) {
  return request({
    url: '/hSysUserManager/getHospitalList',
    method: 'GET',
    params
  })
}

// 新增
export function insertSysUserManager(params) {
  return request({
    url: '/hSysUserManager/insertSysUserManager',
    method: 'POST',
    data: params
  })
}

// 删除
export function updateUserDeleteFlagToOne(params) {
  return request({
    url: `/hSysUserManager/updateUserDeleteFlagToOne?id=${params.id}`,
    method: 'PUT'
    // data: params
  })
}

// 编辑
export function updateSysUserManager(params) {
  return request({
    url: `/hSysUserManager/updateSysUserManager`,
    method: 'PUT',
    data: params
  })
}

// 查看用户详情
export function getSysUserManagerById(params) {
  return request({
    url: `/hSysUserManager/getSysUserManagerById`,
    method: 'get',
    params
  })
}
